package model

import (
	"gorm.io/gorm"
	"time"
)

type Discount struct {
	Id         uint32         `gorm:"column:id;type:int(10) UNSIGNED;primaryKey;not null;" json:"id"`
	CreateTime time.Time      `gorm:"column:create_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"create_time"`
	UpdateTime time.Time      `gorm:"column:update_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"update_time"`
	DeleteTime gorm.DeletedAt `gorm:"column:delete_time;type:datetime(3);default:NULL;" json:"delete_time"`
	Name       string         `gorm:"column:name;type:varchar(255);not null;" json:"name"`
	GoodsId    int32          `gorm:"column:goods_id;type:int(11);not null;" json:"goods_id"`
}

func (Discount) TableName() string {
	return "discount"
}
